Get the number of occurrences of the element

A.count(N)

Get the current memory address and the length in elements of the buffer used to hold an array’s contents and also find the size of the memory buffer in bytes.

from array import *

AI = array('i', [1, 3, 5, 3, 7, 9, 3])
print("Original array: " + str(AI))
# Original array: array('i', [1, 3, 5, 3, 7, 9, 3])

print("Number of occurrences of the number 3 "
      "in the said array: " + str(AI.count(3)))
# Number of occurrences of the number 3 in the said array: 3

See also: https://www.w3resource.com/python-exercises/array/python-array-exercise-6.php